home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / unattended-upgrades.postinst < prev    next >
Text File  |  2008-10-13  |  1KB  |  50 lines

  1. #!/bin/sh
  2. # see: dh_installdeb(1)
  3.  
  4. set -e
  5.  
  6. # Do debconf stuff here
  7. . /usr/share/debconf/confmodule
  8.  
  9. # summary of how this script can be called:
  10. #        * <postinst> `configure' <most-recently-configured-version>
  11. #        * <old-postinst> `abort-upgrade' <new version>
  12. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  13. #          <new-version>
  14. #        * <postinst> `abort-remove'
  15. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  16. #          <failed-install-package> <version> `removing'
  17. #          <conflicting-package> <version>
  18. # for details, see http://www.debian.org/doc/debian-policy/ or
  19. # the debian-policy package
  20.  
  21.  
  22. case "$1" in
  23.     configure)
  24.     db_get unattended-upgrades/enable_auto_updates || true
  25.     if [ "${RET}" = "true" ]; then
  26.     NEWFILE="/usr/share/unattended-upgrades/20auto-upgrades"
  27.     CONFIG="/etc/apt/apt.conf.d/20auto-upgrades"
  28.     ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG"
  29.     ucfr unattended-upgrades "$CONFIG"
  30.     fi
  31.     ;;
  32.  
  33.     abort-upgrade|abort-remove|abort-deconfigure)
  34.     ;;
  35.  
  36.     *)
  37.         echo "postinst called with unknown argument \`$1'" >&2
  38.         exit 1
  39.     ;;
  40. esac
  41.  
  42. # dh_installdeb will replace this with shell code automatically
  43. # generated by other debhelper scripts.
  44.  
  45.  
  46.  
  47. exit 0
  48.  
  49.  
  50.